﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.ServiceModel;

namespace DServiceActivation
{
    public partial class Service1 : ServiceBase
    {
        public Service1()
        {
            InitializeComponent();
        }
        private ServiceHost sh; 
        protected override void OnStart(string[] args)
        {
            sh =  new ServiceHost(typeof(Demo.ServiceImplementation.CalculatorService));
            sh.Open();
        }

        protected override void OnStop()
        {
            if (  sh  != null)
                sh.Close();
        }
    }
}
